<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
		<title>C2earn Admin</title>
		<link rel="stylesheet" href="../Public/css/960.css" type="text/css" media="screen" charset="utf-8" />
		<link rel="stylesheet" href="../Public/css/template.css" type="text/css" media="screen" charset="utf-8" />
		<link rel="stylesheet" href="../Public/css/colour.css" type="text/css" media="screen" charset="utf-8" />
		<!--[if IE]><![if gte IE 6]><![endif]-->
		<script type="text/javascript" src="../Public/js/glow/1.7.0/core/core.js"></script>
		<script type="text/javascript" src="../Public/js/glow/1.7.0/widgets/widgets.js"></script>
		<link href="../Public/js/glow/1.7.0/widgets/widgets.css" type="text/css" rel="stylesheet" />
		<script type="text/javascript">
			glow.ready(function(){
				new glow.widgets.Sortable(
					'#content .grid_5, #content .grid_6',
					{
						draggableOptions : {
							handle : 'h2'
						}
					}
				);
			});
		</script>
		<!--[if IE]><![endif]><![endif]-->
	</head>
	<body>
	
	
		<h1 id="head">C2earn Admin</h1>
		
		<ul id="navigation">
			<li><?php if($nav == 'index'): ?><span class="active"><?php endif; ?><a href="__APP__/index">Overview</a><?php if($nav == 'index'): ?></span><?php endif; ?></li>
			<li><?php if($nav == 'video'): ?><span class="active"><?php endif; ?><a href="__APP__/video">Ad Videos</a><?php if($nav == 'video'): ?></span><?php endif; ?></li>
			<li><?php if($nav == 'coupon'): ?><span class="active"><?php endif; ?><a href="__APP__/coupon">Coupons</a><?php if($nav == 'coupon'): ?></span><?php endif; ?></li>
			<li><?php if($nav == 'order'): ?><span class="active"><?php endif; ?><a href="__APP__/order">Orders</a><?php if($nav == 'order'): ?></span><?php endif; ?></li>
			<li style="float:right;"><a href="<?php echo ($nav_logout); ?>">Logout</a></li>
		</ul>
	<div id="content" class="container_16 clearfix">
				<div class="grid_4">
					<p>
						<label></label>
						<input type="button" value="Add New Coupon" onclick="javascript:document.location.href='<?php echo ($addUrl); ?>'"/>
					</p>
				</div>
				<div class="grid_4">
					<p>
						<label></label>
						<input type="button" value="Category Manage" onclick="javascript:document.location.href='__APP__/category'"/>
						
					</p>
				</div>
			<!--
				<div class="grid_4">
					<p>
						<label>Username<small>Alpha-numeric values</small></label>
						<input type="text" />
					</p>
				</div>
			
				<div class="grid_5">
					<p>
						<label>Email Address</label>
						<input type="text" />
					</p>
				</div>
				<div class="grid_5">
					<p>
						<label>Department</label>
						<select>
							<option>Development</option>
							<option>Marketing</option>
							<option>Design</option>
							<option>IT</option>
						</select>
					</p>
				</div>
				<div class="grid_2">
					<p>
						<label>&nbsp;</label>
						<input type="submit" value="Search" />
					</p>
				</div>
				-->
				<div class="grid_16">
					<table>
						<thead>
							<tr>
								<th>Title</th>
								<th>Category</th>
								<th>Point</th>
								<th colspan="2" width="10%">Actions</th>
							</tr>
						</thead>
						<tfoot>
							<tr>
								<td colspan="5" class="pagination">
									<?php echo ($page); ?>
								</td>
							</tr>
						</tfoot>
						<tbody>
							<?php if(is_array($coupons)): foreach($coupons as $key=>$coupon): ?><tr>
								<td><?php echo ($coupon["c_name"]); ?></td>
								<td><?php echo ($cats[$coupon['cat']]); ?></td>
								<td><?php echo ($coupon["points"]); ?></td>
								<td><a href="<?php echo ($coupon["editUrl"]); ?>" class="edit">Edit</a></td>
								<td><a onclick="javascript:if(!confirm('Are you sure?!')){return false;}" href="<?php echo ($coupon["deleteUrl"]); ?>" class="delete">Delete</a></td>
							</tr><?php endforeach; endif; ?>
						</tbody>
					</table>
				</div>
			</div>
		<div id="foot">
			<div class="container_16 clearfix">
				<div class="grid_16">
					<a href="#">Contact Me</a>
				</div>
			</div>
		</div>
	</body>
</html>